home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9382 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.2 KB

  1. Path: anvil.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 29 Feb 1996 15:20:12 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4h5cbcINNahr@anvil.ugrad.cs.ubc.ca>
  8. References: <JSA.96Feb16135027@organon.com> <1996Feb22.005518.13396@leeweyr.sccsi.com> <4gvrffINNlqo@anvil.ugrad.cs.ubc.ca> <4h4j31$1ga3@watnews1.watson.ibm.com>
  9. NNTP-Posting-Host: anvil.ugrad.cs.ubc.ca
  10.  
  11. In article <4h4j31$1ga3@watnews1.watson.ibm.com>,
  12. Norman H. Cohen <ncohen@watson.ibm.com> wrote:
  13.  
  14.  >When someone mentions a language "for which no two implementations are in
  15.  >agreement", it is C that springs to mind.  Much of the Harbison-Steele
  16.  >book is devoted to explaining the distinctions among K&R C, "traditional"
  17.  >C (which includes extensions made after 1978), and ANSI C.  They describe
  18.  >the Bell Labs Portable C Compiler as "a de facto standard for the
  19.  >traditional language." I have heard many C programmers express the
  20.  >opinion that portability of C programs is best insured by writing in K&R
  21.  >C rather than in ANSI C!  And then on top of this, we have post-ANSI
  22.  
  23. That is a poorly stated opinion. What the programmers mean, of course, is that
  24. if you write in ``K&R'' C (actually ``old style'' C) you ensure that your
  25. program will be accepted by some old, old compilers. Acceptance by a compiler
  26. is not to be confused with real portability issues.
  27.  
  28. Only ANSI guarantees portability.
  29.  
  30.  >dialects such as GNU C and Microsoft C foisted upon us by those who feel
  31.  >they are in a position to impose their own de facto standards.  For
  32.  
  33. So what law is there that prevents the same thing to be done with Ada?
  34. There is a GNU Ada compiler, too---is _that_ 100% compliant with the standards?
  35.  
  36. You can't force implementors to obey a standard.
  37.  
  38.  >example, in the description of the -pedantic option in section 2.3 of
  39.  >"Using GNU CC," Stallman writes: 
  40.  >
  41.  >    A feature to report any failure to conform to ANSI C might be useful
  42.  >    in some instances, but would require considerable additional work and
  43.  >    would be quite different from '-pedantic'.  We recommend, rather,
  44.  >    that users take advantage of the extensions of GNU C and disregard
  45.  >    the limitations of other compilers.  Aside from certain
  46.  >    supercomputers and obsolete small machines, thre is less and less
  47.  >    reason ever to use any other C compiler other than for bootstrapping
  48.  >    GNU CC.
  49.  >
  50.  >The culture in the Ada community is quite different.  The need to pass a
  51.  
  52. The above does not represent the (whole) culture of the community of C users,
  53. however.
  54.  
  55. The GNU compiler is not C, and everyone knows that. It just happens to
  56. translate C programs. It has severely deviant extensions, such as the ability
  57. to define functions within functions, or to have dynamically-sized automatic
  58. variables. The above paragraph from ``Using GNU CC'' has ulterior motives. If
  59. you write freeware code using gratuitous GCC extensions,  its use will be
  60. limited to platforms that are supported by GCC. The user's guide for GCC is not
  61. a substitute for the C standard by any means, so why quote it here?
  62. -- 
  63.  
  64.